package cn.b.training.baby_education_training.api;

import cn.b.training.baby_education_training.repository.PrenatalRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: baby_education_training
 * @description
 * @author: wuying
 * @create: 2022-12-08 11:37
 **/
@RestController
@RequestMapping("/pregnancy")
public class PregnancyController {
    @Autowired
    private PrenatalRepository prenatalRepository;
    @GetMapping("/all")
    public ResponseEntity getAll(){
        return ResponseEntity.ok(prenatalRepository.findAll());
    }
}
